package com.yuexunit.operationman.nbsy.module.Login.model.impl;

import com.yuexunit.operationman.nbsy.Api.Api;
import com.yuexunit.operationman.nbsy.module.Login.bean.PatientBean;
import com.yuexunit.operationman.nbsy.module.Login.model.ISearchModel;
import com.yuexunit.operationman.nbsy.util.ApiUtil;

import rx.Observable;

/**
 * Created by work-jx on 2017/7/12.
 */
public class SearchModel implements ISearchModel{
    Api api;
    public  Api getApiInstance() {
        if(api!=null) {
            return api;
        }else{
            api= ApiUtil.getInstance().createRetrofitApi(Api.class);
            return api;
        }
    }
    @Override
    public Observable<PatientBean> getPatientDate(String inHospitalNo) {
        api=getApiInstance();
        return api.getPatientDate(inHospitalNo);
    }
}
